using Lzfy_Refund_Service.Models;

namespace Lzfy_Refund_Service.Services
{
    /// <summary>
    /// 密码更新任务服务接口
    /// </summary>
    public interface IPasswordUpdateTaskService
    {
        /// <summary>
        /// 创建密码更新任务
        /// </summary>
        /// <param name="request">创建任务请求</param>
        /// <returns>创建任务响应</returns>
        Task<CreatePasswordUpdateTaskResponse> CreateTaskAsync(CreatePasswordUpdateTaskRequest request);

        /// <summary>
        /// 查询任务状态
        /// </summary>
        /// <param name="request">查询请求</param>
        /// <returns>查询响应</returns>
        Task<QueryTaskStatusResponse> QueryTaskStatusAsync(QueryTaskStatusRequest request);

        /// <summary>
        /// 取消任务
        /// </summary>
        /// <param name="request">取消任务请求</param>
        /// <returns>取消任务响应</returns>
        Task<CancelTaskResponse> CancelTaskAsync(CancelTaskRequest request);

        /// <summary>
        /// 根据患者ID获取待执行的任务
        /// </summary>
        /// <param name="patientId">患者ID</param>
        /// <returns>待执行的任务列表</returns>
        Task<List<PasswordUpdateTask>> GetPendingTasksByPatientIdAsync(string patientId);

        /// <summary>
        /// 执行密码更新任务
        /// </summary>
        /// <param name="task">任务信息</param>
        /// <returns>是否执行成功</returns>
        Task<bool> ExecuteTaskAsync(PasswordUpdateTask task);

        /// <summary>
        /// 获取任务统计信息
        /// </summary>
        /// <returns>任务统计信息</returns>
        Task<Dictionary<string, int>> GetTaskStatisticsAsync();
    }
}